package com.huoyun.car.bean;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class CarOwner {
	private Integer id;
	private String name;
	private String idCardNumber;
	private String gender;
	private String nation;
	private Date birthDate;
	private String address;
	
	private String issuingAuthority;
	private Date idCardEffectiveEndDate;
	
	private String bankName;
	private String bankAccount;
	private String accountUsername;
	private String mobilePhone;
	private String phone;
	private String email;
	private Integer status;
	
	private String birthDateStr;
	private String idCardEffectiveEndDateStr;
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getIdCardNumber() {
		return idCardNumber;
	}
	public void setIdCardNumber(String idCardNumber) {
		this.idCardNumber = idCardNumber;
	}
	public String getGender() {
		return gender;
	}
	public void setGender(String gender) {
		this.gender = gender;
	}
	public String getNation() {
		return nation;
	}
	public void setNation(String nation) {
		this.nation = nation;
	}
	public Date getBirthDate() {
		return birthDate;
	}
	public void setBirthDate(Date birthDate) {
		this.birthDate = birthDate;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getIssuingAuthority() {
		return issuingAuthority;
	}
	public void setIssuingAuthority(String issuingAuthority) {
		this.issuingAuthority = issuingAuthority;
	}
	public Date getIdCardEffectiveEndDate() {
		return idCardEffectiveEndDate;
	}
	public void setIdCardEffectiveEndDate(Date idCardEffectiveEndDate) {
		this.idCardEffectiveEndDate = idCardEffectiveEndDate;
	}
	public String getBankName() {
		return bankName;
	}
	public void setBankName(String bankName) {
		this.bankName = bankName;
	}
	public String getBankAccount() {
		return bankAccount;
	}
	public void setBankAccount(String bankAccount) {
		this.bankAccount = bankAccount;
	}
	public String getAccountUsername() {
		return accountUsername;
	}
	public void setAccountUsername(String accountUsername) {
		this.accountUsername = accountUsername;
	}
	public String getMobilePhone() {
		return mobilePhone;
	}
	public void setMobilePhone(String mobilePhone) {
		this.mobilePhone = mobilePhone;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	
	public String getBirthDateStr() {
		return new java.text.SimpleDateFormat("yyyy-MM-dd").format(birthDate);
	}
	
	public void setBirthDateStr(String birthDateStr) {
		DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
		try {
			this.birthDate = format.parse(birthDateStr);
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	public String getIdCardEffectiveEndDateStr() {
		return new java.text.SimpleDateFormat("yyyy-MM-dd").format(idCardEffectiveEndDate);
	}
	
	public void setIdCardEffectiveEndDateStr(String idCardEffectiveEndDateStr) {
		DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
		try {
			this.idCardEffectiveEndDate = format.parse(idCardEffectiveEndDateStr);
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
